/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package sismol.cartography;

import java.io.Serializable;
import java.util.Collection;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import org.hibernate.annotations.CollectionOfElements;

/**
 *
 * @author koji
 */
@Entity
public class Terminal implements Serializable {

    private Long id;
    private Linha linha;
    private Ponto terminal;

    private Collection<Long> saidas;

    @Id
    @GeneratedValue
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @OneToOne
    public Linha getLinha() {
        return linha;
    }

    public void setLinha(Linha linha) {
        this.linha = linha;
    }

    @OneToOne
    public Ponto getTerminal() {
        return terminal;
    }

    public void setTerminal(Ponto terminal) {
        this.terminal = terminal;
    }

    @CollectionOfElements
    public Collection<Long> getSaidas() {
        return saidas;
    }

    public void setSaidas(Collection<Long> saidas) {
        this.saidas = saidas;
    }

}
